<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>计算工资</title>
		<script type="text/javascript">
			function calculating(money) {
				var mon = 0;
				if (money <= 3500) {
					mon = 0;
				} else if (money > 3500 && money <= 8000) {
					mon = ((money - 3500) * 0.02);
				} else if (money > 8000 && money <= 20000) {
					mon = ((money - 8000) * 0.05 + 90);
				} else if (money > 20000) {
					mon = ((money - 20000) * 0.1 + 90 + 600);
				}
				return mon;
			}
			var result=calculating(prompt("请输入薪资情况"));
			alert(result);
		</script>
	</head>
	<body>
	</body>
</html>
